import {LitElement, html} from "lit";
class Children1 extends LitElement {
    static properties = {
        title: {
            type: String,
            reflect: true,
        },
        authTitle: {
            type: String,
            reflect: true,
        }
    };

    constructor() {
        super();
        setTimeout(() => {
            this.title = "title3";
            this.authTitle = "auth-title3";
            this.dispatchEvent(
                new CustomEvent("title-changed",{ detail:{title: this.title, authTitle: this.authTitle}, bubbles: true}))
        }, 4000);
    }

    // createRenderRoot() {
    //     // return document.body;
    //     return this;
    // }

    render() {
        return html`
            <div style="color:red;">
                <slot name="default">aaaaa</slot>
                <h1>kao</h1>
            </div>
        `
    }

}

customElements.define("children1-demo", Children1);
export default Children1;
